#include <coap2/coap.h>

#include "coap-server-implement.h"

#  define NI_MAXHOST      1025
#  define NI_MAXSERV      32


int main ()
{

    coap_log_t log_level = LOG_INFO;

    coap_context_t *ctx = create_context();
    if (!ctx) return -1;

    char addr_str[NI_MAXHOST] = "::";
    char port_str[NI_MAXSERV] = "5683";

    coap_startup();
    coap_dtls_set_log_level(log_level);
    coap_set_log_level(log_level);

    bind_server_addr(addr_str, port_str, ctx);
    init_resources(ctx);
    event_loop(ctx);

    return 0;
}

